<#macro page pm url><#--自定义分页标签-->
<nav>
	<ul class="pagination pagination-sm no-margin pull-right">
		<li>
			<#if pm.curPage gt 1>
				<#assign prepage = pm.curPage - 1>
				<a href="${url}page=${prepage}" aria-label="Previous">
					<span aria-hidden="true">&laquo;</span>
				</a>
			</#if>
		</li>
		<#assign prepage = pm.curPage>
		<#assign minpage = (pm.areaIndex - 1)*pm.areaSize + 1>						
		<#if pm.totlePage lt pm.areaIndex*pm.areaSize>
			<#assign maxpage = pm.totlePage>
		<#else>
			<#assign maxpage = pm.areaIndex*pm.areaSize>
		</#if>	
		
		<#list minpage..maxpage as n>
			<#if pm.curPage == n>
				<li><a href="javascript:;" style="background-color:#eee;"><strong>${n}</strong></a></li>
			<#else>
				<li><a href="${url}page=${n}">${n}</a></li>
			</#if>
		</#list>						
		
		<#if pm.curPage lt pm.totlePage>
			<#assign nextpage = pm.curPage + 1>
			<li>
				<a href="${url}page=${nextpage}" aria-label="Next">
					<span aria-hidden="true">&raquo;</span>
				</a>
			</li>
		</#if>							
		<li>
			<span aria-hidden="true">共${pm.totleNum}条</span>
		</li>
	</ul>
</nav>
</#macro>

<#macro userPhoneHide phoneNum=""><!-- 手机号码隐藏中间部分  -->
<#if  phoneNum?length gte 11>
${phoneNum[0..2]}<#list 3..phoneNum?length-5 as n>${phoneNum[n]}</#list>${phoneNum[phoneNum?length-4..phoneNum?length-1]}
</#if>
</#macro>

<#macro resultTips result msg>
	<div id="alertSuccess" class="alert alert-success" role="alert" style="display:none">
		<strong>操作成功</strong>&nbsp&nbsp<font id="successMsg"></font>
	</div>
	<div id="alertFail" class="alert alert-danger" role="alert" style="display:none">
		<strong>操作失败</strong>&nbsp&nbsp<font id="failMsg"></font>
	</div>
	<!-- 操作成功与否的提示  -->
	<script type="text/javascript">
		function alertSuccess(msg){
			$("#successMsg").html(msg);
			$("#alertFail").hide();
			$("#alertSuccess").show();
		};
		function alertFail(msg){
			$("#failMsg").html(msg);
			$("#alertSuccess").hide();
			$("#alertFail").show();
		};
		<#if result>
		  alertSuccess("${msg?if_exists}");
		<#elseif !result>
		  alertFail("${msg?if_exists}");
		</#if>
	</script>
</#macro>
